package com.yifang.yibingproject.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@ApiModel("【后台】用户详细信息DTO")
public class UserDetailDTO {
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("用户状态 1-正常 2-禁用")
    private Integer status;

    @ApiModelProperty("用户昵称")
    private String nickname;

    @ApiModelProperty("微信小程序openid")
    private String openId;

    @ApiModelProperty("IP")
    private String lastLoginIp;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("创建时间->注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty("注册来源 0.后台添加 1.微信小程序注册 2.APP微信登录注册 3.网页微信扫码登录注册")
    private Integer source;

    @ApiModelProperty("最近一次登录")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;;

    @ApiModelProperty("上次消费时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastCostTime;

    @ApiModelProperty("采购单")
    private int cartCount;

    @ApiModelProperty("收藏")
    private int collectionGoodsCount;

    @ApiModelProperty("近七天打开app次数")
    private int openCount = 0;

    @ApiModelProperty("近七天活跃度")
    private String vitality;

    @ApiModelProperty("感兴趣分类")
    private String classify;



    @ApiModelProperty("会员有效期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDate memberStartDate;

    @ApiModelProperty("会员有效期结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDate memberExpiredDate;

    @ApiModelProperty("会员开通状态")
    private String memberOpenState;

    @ApiModelProperty("开通方式")
    private String memberOpenWay;

    @ApiModelProperty("最后一次会员开通时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime memberOpenTime;

    @ApiModelProperty("会员开通费用")
    private BigDecimal memberFee;

    @ApiModelProperty("会员类型")
    private String memberType;

    @ApiModelProperty("求购总数")
    private int buyCount;

    @ApiModelProperty("求购已处理数")
    private int buyDealCount;

    @ApiModelProperty("求购未处理数")
    private int buyNotDealCount;



    @ApiModelProperty("消费总额->累计消费金额")
    private BigDecimal costAmount = BigDecimal.ZERO;

    @ApiModelProperty("购买次数->累计消费订单数")
    private int buyTimes;

    @ApiModelProperty("累计退款金额")
    private BigDecimal refundAmount = BigDecimal.ZERO;



    @ApiModelProperty("开通时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty("到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty("增值服务")
    private String serviceName;

    @ApiModelProperty("记一笔个数")
    private int remarkCount;

    @ApiModelProperty("购物车商品总数")
    private Integer cartGoodsCount;

    @ApiModelProperty("调价")
    private BigDecimal adjustPriceRate;

    @ApiModelProperty("归属方")
    private String belongTo;

    @ApiModelProperty("标签id")
    private String customerServiceLabelId;

    @ApiModelProperty("客服标签名称")
    private String customerServiceLabelName;

    @ApiModelProperty("操作按钮 1权限操作 2增值服务 多个以英文逗号,分隔")
    private String action;

    @ApiModelProperty("用户类型")
    private String userType;
}
